<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Nfc Interactor: NdefNfcGeoRecord Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="nfcinteractor80.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Nfc Interactor
   &#160;<span id="projectnumber">2.1.0</span>
   </div>
   <div id="projectbrief">Shows all information about NFC tags available through Qt Mobility APIs. Includes reusable convenience classes for handling additional tag types: Smart Poster, Image and vCard.</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">NdefNfcGeoRecord Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="NdefNfcGeoRecord" --><!-- doxytag: inherits="NdefNfcSmartUriRecord" -->
<p>Store longitude and latitude on a tag, to allow the user to view a map when touching the tag.  
 <a href="class_ndef_nfc_geo_record.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="ndefnfcgeorecord_8h_source.html">ndefnfcgeorecord.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for NdefNfcGeoRecord:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_ndef_nfc_geo_record.png" usemap="#NdefNfcGeoRecord_map" alt=""/>
  <map id="NdefNfcGeoRecord_map" name="NdefNfcGeoRecord_map">
<area href="class_ndef_nfc_smart_uri_record.html" title="Smart class that uses the smallest possible NDEF record type for storing the requested information - ..." alt="NdefNfcSmartUriRecord" shape="rect" coords="0,56,148,80"/>
<area href="class_ndef_nfc_sp_record.html" title="Handles the Smart Poster meta-record and is able to both parse and assemble a smart poster according ..." alt="NdefNfcSpRecord" shape="rect" coords="0,0,148,24"/>
</map>
 </div></div>

<p><a href="class_ndef_nfc_geo_record-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_ndef_nfc_geo_record.html#a69101bd70bbeadf3fd892fe203436a61">NfcGeoType</a> { <b>GeoUri</b> =  0, 
<b>NokiaMaps</b>, 
<b>WebRedirect</b>
 }</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The type of link to generate for the specified coordinates.  <a href="class_ndef_nfc_geo_record.html#a69101bd70bbeadf3fd892fe203436a61">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8b6ba4a9e4796f48dfbfa1ec2fc02ea5"></a><!-- doxytag: member="NdefNfcGeoRecord::NdefNfcGeoRecord" ref="a8b6ba4a9e4796f48dfbfa1ec2fc02ea5" args="()" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_ndef_nfc_geo_record.html#a8b6ba4a9e4796f48dfbfa1ec2fc02ea5">NdefNfcGeoRecord</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an empty Geo record. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8c737d1bb7a2acd3c6e3f16ab507b6b2"></a><!-- doxytag: member="NdefNfcGeoRecord::NdefNfcGeoRecord" ref="a8c737d1bb7a2acd3c6e3f16ab507b6b2" args="(const QGeoCoordinate &amp;geoCoordinate)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_ndef_nfc_geo_record.html#a8c737d1bb7a2acd3c6e3f16ab507b6b2">NdefNfcGeoRecord</a> (const QGeoCoordinate &amp;geoCoordinate)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a Geo record based on the record passed through the argument. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QUrl&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_ndef_nfc_geo_record.html#a82a938d5cda860515fd8ce3ffca844e0">webServiceUrl</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current web service URL.  <a href="#a82a938d5cda860515fd8ce3ffca844e0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_ndef_nfc_geo_record.html#afd580afcee5373f21b377fa0c49b4db2">setWebServiceUrl</a> (const QUrl &amp;webServiceUrl)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the web service URL.  <a href="#afd580afcee5373f21b377fa0c49b4db2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab059da3f3f2d121da1c214af418e0c6c"></a><!-- doxytag: member="NdefNfcGeoRecord::location" ref="ab059da3f3f2d121da1c214af418e0c6c" args="() const " -->
QGeoCoordinate&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_ndef_nfc_geo_record.html#ab059da3f3f2d121da1c214af418e0c6c">location</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current location / geo coordinate. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aec629cf8ab1f8406c0a36a8bcbb9b232"></a><!-- doxytag: member="NdefNfcGeoRecord::setLocation" ref="aec629cf8ab1f8406c0a36a8bcbb9b232" args="(const QGeoCoordinate &amp;geoCoordinate)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_ndef_nfc_geo_record.html#aec629cf8ab1f8406c0a36a8bcbb9b232">setLocation</a> (const QGeoCoordinate &amp;geoCoordinate)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the location to the specified geo coordinate. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_ndef_nfc_geo_record.html#a33c5f2ff2bc72f3ed311a94cde67bf46">setLatitude</a> (const double latitude)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the latitude in decimal degrees; the value should be in the WSG84 datum.  <a href="#a33c5f2ff2bc72f3ed311a94cde67bf46"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_ndef_nfc_geo_record.html#abd2049e372ef106f01268407bb16a4bb">setLongitude</a> (const double longitude)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the longitude in decimal degrees; the value should be in the WSG84 datum.  <a href="#abd2049e372ef106f01268407bb16a4bb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5521a973b9651dd6417193e2e1da1ef4"></a><!-- doxytag: member="NdefNfcGeoRecord::geoType" ref="a5521a973b9651dd6417193e2e1da1ef4" args="() const " -->
<a class="el" href="class_ndef_nfc_geo_record.html#a69101bd70bbeadf3fd892fe203436a61">NfcGeoType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_ndef_nfc_geo_record.html#a5521a973b9651dd6417193e2e1da1ef4">geoType</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current geo type. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3a8000b77eba36ccda9dd6ae4aed8b65"></a><!-- doxytag: member="NdefNfcGeoRecord::setGeoType" ref="a3a8000b77eba36ccda9dd6ae4aed8b65" args="(const NfcGeoType geoType)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_ndef_nfc_geo_record.html#a3a8000b77eba36ccda9dd6ae4aed8b65">setGeoType</a> (const <a class="el" href="class_ndef_nfc_geo_record.html#a69101bd70bbeadf3fd892fe203436a61">NfcGeoType</a> geoType)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Change the geo type, updating the payload to the new type. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Store longitude and latitude on a tag, to allow the user to view a map when touching the tag. </p>
<p>Geo tags are not standardized by the NFC forum, therefore, this class supports three different types of writing the location to a tag.</p>
<p>1. GeoUri: write URI based on the "geo:" URI scheme, as specified by RFC5870, available at: <a href="http://geouri.org/">http://geouri.org/</a> Currently supported by MeeGo Harmattan and Android, not recognized by Symbian at the moment.</p>
<p>2. NokiaMaps: write URI based on a Nokia Maps link, following the "http://m.ovi.me/?c=..." scheme of the Nokia/Ovi Maps Rendering API. Depending on the target device, the phone / web service should then redirect to the best maps representation. On Symbian, the phone will launch the Nokia Maps client. On a desktop computer, the full Nokia Maps web experience will open. On other phones, the HTML 5 client may be available. On MeeGo Harmattan, currently only a static Maps image is shown, making this alternative not suitable for the Nokia N9.</p>
<p>3. WebRedirect: uses the web service at NfcInteractor.com to check the OS of the phone, and then redirect to the best way of showing maps to the user. On MeeGo Harmattan, this would be the GeoUri (1) scheme; on Symbian, the NokiaMaps-link (2). Essentially, this allows opening the Maps client on all currently available NFC capable Nokia phones. Note the limitations and terms of use of the web service. For real world deployment, outside of development and testing, it's recommended to host the script on your own web server. Find more information at nfcinteractor.com. If you host the web service on your own URI, you can change the location using <a class="el" href="class_ndef_nfc_geo_record.html#afd580afcee5373f21b377fa0c49b4db2" title="Set the web service URL.">setWebServiceUrl()</a>.</p>
<p>As this class is based on the Smart URI base class, the payload is formatted as a URI record initially. When first adding Smart Poster information (like a title), the payload instantly transforms into a Smart Poster.</p>
<dl class="version"><dt><b>Version:</b></dt><dd>1.0.0 </dd></dl>
</div><hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="a69101bd70bbeadf3fd892fe203436a61"></a><!-- doxytag: member="NdefNfcGeoRecord::NfcGeoType" ref="a69101bd70bbeadf3fd892fe203436a61" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="class_ndef_nfc_geo_record.html#a69101bd70bbeadf3fd892fe203436a61">NdefNfcGeoRecord::NfcGeoType</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The type of link to generate for the specified coordinates. </p>
<p>For more details on the different types, see the general class documentation. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a33c5f2ff2bc72f3ed311a94cde67bf46"></a><!-- doxytag: member="NdefNfcGeoRecord::setLatitude" ref="a33c5f2ff2bc72f3ed311a94cde67bf46" args="(const double latitude)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NdefNfcGeoRecord::setLatitude </td>
          <td>(</td>
          <td class="paramtype">const double&#160;</td>
          <td class="paramname"><em>latitude</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the latitude in decimal degrees; the value should be in the WSG84 datum. </p>
<p>To be valid, the latitude must be between -90 to 90 inclusive. (</p>
<dl class="see"><dt><b>See also:</b></dt><dd>QGeoCoordinate::setLatitude()) </dd></dl>

</div>
</div>
<a class="anchor" id="abd2049e372ef106f01268407bb16a4bb"></a><!-- doxytag: member="NdefNfcGeoRecord::setLongitude" ref="abd2049e372ef106f01268407bb16a4bb" args="(const double longitude)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NdefNfcGeoRecord::setLongitude </td>
          <td>(</td>
          <td class="paramtype">const double&#160;</td>
          <td class="paramname"><em>longitude</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the longitude in decimal degrees; the value should be in the WSG84 datum. </p>
<p>To be valid, the longitude must be between -180 to 180 inclusive. (</p>
<dl class="see"><dt><b>See also:</b></dt><dd>QGeoCoordinate::setLongitude()) </dd></dl>

</div>
</div>
<a class="anchor" id="afd580afcee5373f21b377fa0c49b4db2"></a><!-- doxytag: member="NdefNfcGeoRecord::setWebServiceUrl" ref="afd580afcee5373f21b377fa0c49b4db2" args="(const QUrl &amp;webServiceUrl)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NdefNfcGeoRecord::setWebServiceUrl </td>
          <td>(</td>
          <td class="paramtype">const QUrl &amp;&#160;</td>
          <td class="paramname"><em>webServiceUrl</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the web service URL. </p>
<p>The parameter should contain the complete URL, including the "?c=" part. The script will then add longitude and latitude, separated by a comma. </p>

</div>
</div>
<a class="anchor" id="a82a938d5cda860515fd8ce3ffca844e0"></a><!-- doxytag: member="NdefNfcGeoRecord::webServiceUrl" ref="a82a938d5cda860515fd8ce3ffca844e0" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QUrl NdefNfcGeoRecord::webServiceUrl </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the current web service URL. </p>
<p>By default, the web service hosted at nfcinteractor.com is used. See terms and conditions at nfcinteractor.com </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="ndefnfcgeorecord_8h_source.html">ndefnfcgeorecord.h</a></li>
<li>ndefnfcgeorecord.cpp</li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Properties</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Mon Mar 12 2012 13:32:48 for Nfc Interactor by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
